/*
Copyright [2012] [Reimar Klammer / David Laubichler]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#ifndef _FIELD_H
#define _FIELD_H
#include "AntSimulationBaseItem.h"
#include "FoodHolder.h"
#include <string>
#include <list>

using namespace std;

class PlaceableObject;
class Food;
class AntHive;

class Field :
	public AntSimulationBaseItem, public FoodHolder
{
private:
	int m_X,m_Y;
	Field* m_North;
	Field* m_South;
	Field* m_West;
	Field* m_East;
	list<PlaceableObject*> m_Items;
	int m_Pheromones;


public:
	Field(int x,int y);
	~Field(void);
	void Simulate();
	int getX();
	int getY();
	void SetNorth(Field*);
	void SetSouth(Field*);
	void SetEast(Field*);
	void SetWest(Field*);
	Field* getNorth();
	Field* getSouth();
	Field* getEast();
	Field* getWest();
	void WritePosition();
	void AddItem(PlaceableObject*);
	void RemoveItem(PlaceableObject*);
	void placeFood(Food* food);
	void SetPheromones(int );
	void GetXml(std::string* s);

	AntHive* getHive();
	Food* getFood();

	int getPheromones();

};

#endif